<?php
/**
 * For easyness here is an example to execute a PDOQuery via
 * prepared statements.
 *
 * @author Xander Hoogland <home@xanland.nl>
 * @package default
 * @deprecated
 * @see cModel
 */

$sQuery = "SELECT `inhoud`, `bgimage` FROM `pagina` WHERE `titel` = :sPagina;";
try
{
	$oStmt = $pPDO -> prepare ($sQuery);
	$oStmt -> bindParam (':sPagina', str_replace ('_', ' ', $sPagina), PDO::PARAM_STR);
	$oStmt -> execute ();
	$oStmt -> bindColumn ('inhoud', $sInhoud);
	$oStmt -> bindColumn ('bgimage', $sBgImage);
	$oStmt -> fetch (PDO::FETCH_BOUND);
	$sInhoud = preg_replace_callback ($_SESSION['config']['sModuleRegex'], 'cFunctions::includeModule', $sInhoud);
}
catch (PDOException $e)
{
	ePDOException :: writeMessage ($e);
}